<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/templates/templateComum.xhtml">
	<ui:define name="conteudo">
		<center>
	            <form action="#{facesContext.externalContext.requestContextPath}/j_spring_security_check" method="post">
		            <h:panelGrid columns="2">
		            	<h:outputLabel for="j_username" value="LOGIN" />
			            <h:inputText class="textfield" id="j_username" required="true"/>
			            <h:outputLabel for="j_password" value="SENHA" />
			            <h:inputSecret class="textfield" id="j_password" required="true"/>
			            <h:outputLabel value="" />
			            <h:commandButton class="bt_entrar" value="ENTRAR"/>
		            </h:panelGrid>
		        </form>
		        <h:panelGroup rendered="#{param.erro == 'invalid'}">
		        	<div id="mensagens">USUÁRIO OU SENHA INCORRETO!</div>
		        </h:panelGroup>
		        <h:panelGroup rendered="#{param.erro == 'expired'}">
		        	<div id="mensagens">SESSÃO EXPIRADA!</div>
		        </h:panelGroup>
		        <h:panelGroup rendered="#{param.erro == 'denied'}">
		        	<div id="mensagens">ACESSO NEGADO!</div>
		        </h:panelGroup>
		        
		    </center>          	
	</ui:define>
</ui:composition>
</html>